{template header}

<div class="container">




    <div class="panel panel-default">
        <div class="panel-body">
<div class="onecate">
<ul>
<li><a href="{tsUrl('study')}">首页</a></li>
{loop $arrOneCate $key $item}
<li>
<a {if $item['cateid']==$strStudy['cateid']}class="select"{/if} href="{tsUrl('study','cate',array('id'=>$item['cateid']))}"> {$item['catename']}</a>
</li>
{/loop}
<li class="create"><a href="{tsUrl('study','create')}">创建课程</a></li>
</ul>
</div>
</div>
</div>



    <div class="twocate">
        <h1><a href="{tsUrl('study','cate',array('id'=>$oneCate['cateid']))}">{$oneCate['catename']}</a></h1>
        <ul class="channel-nav">
            {loop $arrTwoCate $key $item}
            <li><a href="{tsUrl('study','cate',array('id'=>$item['cateid']))}" >{$item[catename]}</a></li>
            {/loop}
        </ul>
    </div>




    <div class="row">
<div class="col-md-8">


    <div class="panel panel-default">
        <div class="panel-body">
<div class="kcinfo"> 
<div class="photo">
<a href="{tsUrl('study','show',array('id'=>$strStudy['studyid']))}"><img src="{$strStudy['photo']}" alt="{$strStudy['studyname']}" class="pic1 fl" /></a>
</div>


<div class="info">
<h1>
<a href="{tsUrl('study','show',array('id'=>$strStudy['studyid']))}">{$strStudy[studyname]}</a>          
</h1>

<div class="other">

<div class="price">价格：<i>￥{$strStudy['price']}</i></div>

课时：<span>{$strStudy['count_lesson']} 课</span>
<br />
学员：<span>{$strStudy['count_learn']} 人</span>
<br />
浏览：<span>{$strStudy['count_view']} 次</span>
</div>
</div>

<div class="learnbtn">

{if $strStudy['learn']}

{if $strStudy['learn']['status']==2}
已学完	
{/if}
{if $strStudy['learn']['status']==1}
已学{$strStudy['learn']['count_lesson']}课时
{/if}

{else}
<a class="btn btn-large btn-success" href="javascript:void('0');" onclick="studyLearn('{$strStudy['studyid']}');">购买学习</a>
{/if}
</div>

<div class="clear"></div>

<div style="margin-bottom:0px" class="pills">
<a class="on" href="{tsUrl('study','show',array('id'=>$strStudy[studyid]))}">课时</a>
{if $strStudy['userid']==$TS_USER['userid']  || $TS_USER['isadmin']==1}
<a href="{tsUrl('study','edit',array('ts'=>'base','studyid'=>$strStudy['studyid']))}">管理</a>
<a href="{tsUrl('study','add',array('id'=>$strStudy[studyid]))}">添加新课时</a>
{/if}
</div>

</div>
</div>
</div>



    <div class="panel panel-default">
        <div class="panel-heading">全部学员</div>
        <div class="panel-body">
<div class="facelist">
<ul>
{loop $arrLearnUser $key $item}
<li>
<a href="{tsUrl('user','topic',array('id'=>$item[userid]))}" ><img src="{$item[face]}" alt="{$item[username]}" width="48" height="48" /></a>
<div class="username"><a href="{tsUrl('user','topic',array('id'=>$item[userid]))}"  title="{$item[username]}">{$item[username]}</a></div>
</li>
{/loop}
</ul>


<div class="clear"></div>
<div class="page">{$pageUrl}</div>

</div>
</div>
</div>





</div>


<div class="col-md-4">



    <div class="panel panel-default">
        <div class="panel-heading">课时列表</div>
        <div class="panel-body">
<div class="lesson-nav">
<ul>
{loop $arrLesson $key $item}
<li 
{if $strLesson['lessonid']==$item['lessonid']}class=" current"{/if}><span class="lesson-index">L{$item['orderid']}</span>
<span class="lesson-title"><a href="{tsUrl('study','lesson',array('id'=>$item['lessonid']))}">{php echo cututf8($item['title'],0,16,false)}</a></span>
</li>                                      
{/loop}
</ul>
</div>
</div>
</div>




</div>
</div>




</div>
{php doAction('tseditor','mt')}
{template footer}